# 安装
 if [[ -z "$(docker images -q minio/minio:latest 2> /dev/null)" ]]; then
    docker pull minio/minio:latest
  else
    echo "minio installed"
  fi
#	运行
  if [[ -z "$(docker ps -aqf "name=minio-pattern")" ]]; then
    mkdir -p /opt/minio/data
      mkdir -p /opt/minio/config

    	docker run --name minio-pattern \
    	--add-host=project-pattern:192.168.0.101 \
      -p 10003:9000 \
      -p 10004:10004 \
      -d --restart=always \
      -e "MINIO_ACCESS_KEY=admin_minio_key" \
      -e "MINIO_SECRET_KEY=admin_minio_key" \
      -v /opt/minio/data:/data --privileged=true \
      minio/minio server /data --console-address ":10004" --address ":9000"
  else
      echo "minio-pattern running"
  fi

